Skip to content

Conversation

@lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Dec 2, 2025

No description provided.

Copy link
Contributor

@ladvoc ladvoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg

owned_buffer_info = audio_event.frame_received.frame
frame = AudioFrame._from_owned_info(owned_buffer_info)
if self._processor is not None:
frame = self._processor._process(frame)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat.. this is clean

Copy link
Member

@theomonnom theomonnom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Comment on lines +11 to +16
@property
@abstractmethod
def is_enabled(self) -> bool: ...

@abstractmethod
def set_enabled(self, enable: bool): ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if using a property would work? It seems more python idiomatic

    @property
    @abstractmethod
    def enabled(self) -> bool: ...

    @enabled.setter
    @abstractmethod
    def enabled(self, value: bool) -> None: ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be used like:

processor.enabled = False
processor.enabled = True

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds fine to me!

Comment on lines 18 to 28
@abstractmethod
def _update_stream_info(
self,
*,
room_name: str,
participant_identity: str,
publication_sid: str,
): ...

@abstractmethod
def _update_credentials(self, *, token: str, url: str): ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: If this is called by an external event, maybe we can call those events like this?
So it is obvious for the users implementing them that this is external.

def on_stream_info_updated()

def on_credentials_updated()

def _process(self, frame: T) -> T: ...

@abstractmethod
def _close(self): ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's OK for close to be public

Suggested change
def _close(self): ...
def close(self): ...

Copy link
Contributor Author

@lukasIO lukasIO Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking close would rather be an internal method that we call to end the lifecycle of a processor.

Users would be expected to disable it with processor.enabled = False.

Co-authored-by: Théo Monnom <theo.8bits@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants